package com.fany.utils;

import android.graphics.Rect;

public class ShapeUtils
{
	public static void scaleRect(Rect rect, float rate)
	{
		int widthOffset = (int)(rect.width()*(1-rate)/2);
		rect.left += widthOffset;
		rect.right -= widthOffset;
		int heightOffset = (int)(rect.height()*(1-rate)/2);
		rect.top += heightOffset;
		rect.bottom -= heightOffset;
	} 
}
